package com.bjsxt.commu2;

public class ProduceRunnable implements Runnable {

    private Product product;

    public ProduceRunnable(Product product) {
        this.product = product;
    }

    @Override
    public void run() {

        int i = 0;
        while (true) {

            product.produce(i);

            i++;
        }
    }
}
